<?php
defined('SECUR_CHECK') or die("Security error");
$site->set_templates(array("head.tpl", "login.tpl", "footer.tpl"));
$login = false;
if(isset($_POST['login']))
{
    if($_POST['email'] != '' && $_POST['password'] != '')
    {
        // Attempt to login
        if($user->login($_POST['email'], $_POST['password']))
        {
            $login = true;
            unset($user);
            $user = new user($_SESSION['uid']);
        }
        else
        {
            
        }
    }
    else
    {
        // No name/password given
    }
}
$smarty->assign("LOGIN", $login);
?>
